#include "ModContainer.h"

#ifdef WIN32
//Using Windows DLL's
#include <Windows.h>
bool ModContainer::TryLoadLibrary()
{
	m_pLibraryHandle = LoadLibrary(m_strLibraryPath.c_str());
	if(m_pLibraryHandle == NULL)
		return false;
	return true;
}
void ModContainer::UnloadLibrary()
{
	if(Validate())
	{
		FreeLibrary((HMODULE)m_pLibraryHandle);
	}
	m_pLibraryHandle = NULL;
	(*m_pLibraryLoadFlag) = false;
}
#else
//Using Linux .so libraries
bool ModContainer::TryLoadLibrary()
{
	return false;
}
void ModContainer::UnloadLibrary()
{
}
#endif